pp108 : Creating an XML Schema

Creating an XML Schema

This topic describes the procedure to create an XML schema.

XML schema is a set of schema fragments that define the structure of an XML instance. In Process Platform, with the help of XML Schema Definition
(XSD), you can interpret the XML format of all types of documents. It acts as a common platform for various types of documents to exchange the document metadata. For example, in Process Platform, you can use the message mapping feature in a Business Process Model and determine the XML content by reading the XSD in the WSDL for a Web service.

  1. Select a starting point and click to open the schema definition modeler.
  2. Provide the name and description of the schema in the Schema Wizard screen.
  3. Provide the XML schema. Do one of the following:
    • By default, Enter schema or Instance is selected. Provide the relevant schema XSD or schema XML in the Enter schema text box.
    • To import the schema from an external URL, select the Import from URL option.
      1. Provide the relevant URL of the schema in the Schema URL text box. For example, http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailOrder.xsd.
      2. Select the Autentication Details option if you want to authenticate the schema for selected users only. These authentication credentials will allow the user to read the schema.
      3. Provide the authentication credentials:
        1. Based on the type of authentication, provide the username. The different types of authentication are as follows:
          • Basic: The server authorizes a request only after validating the username and password.
          • Digest: The server authorization is similar to that of Basic authentication, but the password is not sent in clear text in this type of authentication.
          • NTLM: This type of authentication protocol is implemented in various Microsoft networks.
          • SAML 1.1/Basic: The method of authorization in SAML 1.1/Basic authentication combines Basic authentication and SAML 1.1 authentication.
        2. Provide the relevant password in the text box that is displayed.

          Note: If the imported schemas exist in the workspace, they will be updated with the latest content. If they are not found in the workspace, the newly created schemas will be stored in the importedschemas folder under the project.

          Note: If the schema contains imported schemas, they will be shown at the following two locations:

          • Within a folder under the importedschemas folder
          • Within the XSD reference under the parent schema
  4. Click Finish. The created <XML Schema> will be added to the project. For more information, refer to schema created from an external URL.
    The XML Schema is created. This can be used as a base for creating the related schema fragments.

    Note: If you create the schema from CUSP > Applications > New Process Platform Document, a directory field appears in the wizard. Click and select the location to save the schema definition. Click Finish.

    Note: Creating a Web service in a project will always refer to the existing imported schemas irrespective of whether the schemas exist in the same project or a different project.

Viewing/Modifying the XML Schema:

  1. Open the XML schema. The properties window of the schema displays the Target Namespace URI, Namespace Prefix, and the Base XML Schema Node. Based on the provided data, these fields will be automatically populated.

    Note: A schema may comprise components from multiple namespaces. To identify the components and provide a prefix, add the elementFormDefault="qualified" attribute to the Base XML Schema Node. The elementFormDefault="qualified" attribute indicates that all the elements, including local elements (defined within complexType) must be qualified in the instance documents. For example, the Base XML Schema Node in the schema will be <xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema' elementFormDefault="qualified"/>.

  2. If the fields appear to be empty, provide the Target Namespace URI, Namespace Prefix, and External URL in their respective text boxes.
  3. If you want to refer to other schemas, do the following:
    1. Click in the table grid. The column of the table is activated.
    2. Click in the XSD Reference column and select the required XSD from the Select an XSD dialog box. Click OK. The referred XSD is displayed in the XSD Reference.
      Note: The prefix for the target namespace of the XSD must be edited in the Base XML Schema Node.
    3. Click .
      The XML schema is updated with the relevant changes.
  4. Expand the XML schema to view the schema fragments and the XSD references.

Reloading the Schema:

Reloading the schema enables you to include or import schemas into the existing schema. Perform the following steps to reload an XML schema:

  1. Right-click the required schema and select Reload XML Schema Definition. The schema wizard is populated with the External URL.
    Note: If the External URL field is empty, provide the relevant URL of the schema in the corresponding text box that is displayed.
  2. If required, provide the authentication details. For more information, refer to step 3c in Creating an XML Schema.
  3. Click Finish.
    The schema is reloaded with the relevant changes.

Related tasks

Creating an Object Template
Creating XML Schema Fragments
Setting Special Attribute Properties